/**
 * Created by IntelliJ IDEA.
 * User: Tomek
 * Date: 10.06.12
 * Time: 15:44
 * To change this template use File | Settings | File Templates.
 */
package zakladki.AS3 {
import mx.controls.Text;

public class PublicTransportImageManager {

    private var _transPublic:TranspPublic;

    private var _cityBusText:Text;
    private var _miniBusText:Text;
    private var _longDistanceBusText:Text;
    private var _tramSubwayText:Text;
    private var _taxiText:Text;
    private var _suburbanTrainText:Text;
    private var _longDistanceTrainText:Text;

    private var _longDistanceFlightsText:Text;
    private var _shortDistanceFlightsText:Text;


    public function PublicTransportImageManager(publicTransImgManager:TranspPublic, cityBusText:Text, miniBusText:Text, longDistanceBus:Text, tramSubwayText:Text, taxiText:Text, suburbanTrainText:Text, longDistanceTrainText:Text, longDistanceFlightsText:Text, shortDistanceFlightsText:Text) {
        _transPublic = publicTransImgManager;
        _cityBusText = cityBusText;
        _miniBusText = miniBusText;
        _longDistanceBusText = longDistanceBus;
        _tramSubwayText = tramSubwayText;
        _taxiText = taxiText;
        _suburbanTrainText = suburbanTrainText;
        _longDistanceTrainText = longDistanceTrainText;
        _longDistanceFlightsText = longDistanceFlightsText;
        _shortDistanceFlightsText = shortDistanceFlightsText;
    }

    public function cityBusChanged(value:String,display:Boolean):void{
        _transPublic.licznikAutbusMiejski.visible = display;
        _cityBusText.visible = display;
        if(display){
            _cityBusText.text = value;
        }
    }

    public function miniBusChanged(value:String,display:Boolean):void{
        _transPublic.licznikMinibus.visible = display;
        _miniBusText.visible = display;
        if(display){
            _miniBusText.text = value;
        }
    }

    public function longDistanceBusChanged(value:String, display:Boolean):void {
        _transPublic.licznikBus.visible = display;
        _longDistanceBusText.visible = display;
        if(display){
            _longDistanceBusText.text = value;
        }
    }

    public function tramSubwayChanged(value:String, display:Boolean):void {
        _transPublic.licznikTramwaj.visible = display;
        _tramSubwayText.visible = display;
        if(display){
            _tramSubwayText.text = value;
        }
    }

    public function suburbanTrainChanged(value:String, display:Boolean):void {
        _transPublic.licznikPodmiejska.visible = display;
        _suburbanTrainText.visible = display;
        if(display){
            _suburbanTrainText.text = value;
        }
    }

    public function taxiChanged(value:String, display:Boolean):void {
        _transPublic.licznikTaxi.visible = display;
        _taxiText.visible = display;
        if(display){
            _taxiText.text = value;
        }
    }

    public function longDistanceTrainChanged(value:String, display:Boolean):void {
        _transPublic.licznikKolej.visible = display;
        _longDistanceTrainText.visible = display;
        if(display){
            _longDistanceTrainText.text = value;
        }
    }

    public function shortDistanceFlightChanged(value:String, display:Boolean):void {
        _transPublic.licznikLotyKrotko.visible = display;
        _shortDistanceFlightsText.visible = display;
        if(display){
            _shortDistanceFlightsText.text = value;
        }
    }

    public function longDistanceFlightChanged(value:String, display:Boolean):void {
        _transPublic.licznikLotyDaleko.visible = display;
        _longDistanceFlightsText.visible = display;
        if(display){
            _longDistanceFlightsText.text = value;
        }
    }

    public function get transPublic():TranspPublic {
        return _transPublic;
    }

    public function set transPublic(value:TranspPublic):void {
        _transPublic = value;
    }

    public function get cityBusText():Text {
        return _cityBusText;
    }

    public function set cityBusText(value:Text):void {
        _cityBusText = value;
    }

    public function get miniBusText():Text {
        return _miniBusText;
    }

    public function set miniBusText(value:Text):void {
        _miniBusText = value;
    }

    public function get longDistanceBusText():Text {
        return _longDistanceBusText;
    }

    public function set longDistanceBusText(value:Text):void {
        _longDistanceBusText = value;
    }

    public function get tramSubwayText():Text {
        return _tramSubwayText;
    }

    public function set tramSubwayText(value:Text):void {
        _tramSubwayText = value;
    }

    public function get taxiText():Text {
        return _taxiText;
    }

    public function set taxiText(value:Text):void {
        _taxiText = value;
    }

    public function get suburbanTrainText():Text {
        return _suburbanTrainText;
    }

    public function set suburbanTrainText(value:Text):void {
        _suburbanTrainText = value;
    }

    public function get longDistanceTrainText():Text {
        return _longDistanceTrainText;
    }

    public function set longDistanceTrainText(value:Text):void {
        _longDistanceTrainText = value;
    }

    public function get longDistanceFlightsText():Text {
        return _longDistanceFlightsText;
    }

    public function set longDistanceFlightsText(value:Text):void {
        _longDistanceFlightsText = value;
    }

    public function get shortDistanceFlightsText():Text {
        return _shortDistanceFlightsText;
    }

    public function set shortDistanceFlightsText(value:Text):void {
        _shortDistanceFlightsText = value;
    }
}
}
